import request from "@/utils/http";

// 获取借阅记录列表
export const getBorrowList = (params) => {
  return request({
    url: "/api/borrow/list",
    params,
  });
};

// 借阅图书
export const postBorrowBook = (data) => {
  return request.post("/api/borrow/book", data);
};

// 归还图书
export const postReturnBook = (data) => {
  return request.post("/api/return/book", data);
};

// 删除借阅历史
export const deleteBorrowDel = (id) => {
  return request.delete("/api/borrow/del", { params: { id } });
};
